package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class noteHomeWork {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("./note.txt");
        Scanner scan = new Scanner(System.in);
        while(true){
            String in = scan.nextLine();
            if("exit".equals(in)){
                break;
            }
            byte [] data = in.getBytes(StandardCharsets.UTF_8);
            fos.write(data);
        }
        System.out.println("再见");
    }
}
